package metalink.admin;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import model.admin.*;
import vo.*;

import java.util.*;

public class UpdateStudentList extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	ArrayList<StudentDetailsVo> list = new ArrayList<StudentDetailsVo>();
	int student_id;
	String student_name;
	String mobile_number;
	String phone_number;
	String address_line_1;
	String address_line_2;
	String city;
	String state;
	String country;
	String date_of_birth;
	String highest_degree;
	int highest_degree_marks;
	String highest_degree_college_name;
	int highest_degree_passout_year;
	String previous_degree_1;
	int previous_degree_1_marks;
	String previous_degree_1_college_name;
	int previous_degree_1_passout_year;
	String previous_degree_2;
	int previous_degree_2_marks;
	String previous_degree_2_college_name;
	int previous_degree_2_passout_year;
	int years_of_experience;
	String gender;
	String father_name;
	String pan_card_number;
	String passport_number;
	String passport_expiry_date;
	String roll_number;
	String registration_number;
	String email_id;
	String status;
	String update="";

	public String execute(){
		PopulateStudentsListMo mo =new PopulateStudentsListMo();
	
		try { 
			if(update.contentEquals("yes")){
				
				mo.insertStudentInfo(student_id, student_name, roll_number, registration_number, mobile_number, phone_number, address_line_1, 
									address_line_2, city, state, country, email_id, date_of_birth, highest_degree, highest_degree_marks, highest_degree_college_name, 
									highest_degree_passout_year, previous_degree_1, previous_degree_1_marks, previous_degree_1_college_name, previous_degree_1_passout_year,
									previous_degree_2, previous_degree_2_marks, previous_degree_2_college_name, previous_degree_2_passout_year,
									years_of_experience, gender, father_name, pan_card_number, passport_number, passport_expiry_date,status,update);
				list=mo.populatelist();
			}else{
			new PopulateStudentsListMo().updateStudentList(student_id,student_name,mobile_number,phone_number,address_line_1,address_line_2,
					city,state,country,date_of_birth,highest_degree,highest_degree_marks,highest_degree_college_name,
					highest_degree_passout_year,previous_degree_1,previous_degree_1_marks,previous_degree_1_college_name,
					previous_degree_1_passout_year,previous_degree_2,previous_degree_2_marks,previous_degree_2_college_name,
					previous_degree_2_passout_year,years_of_experience,gender,father_name,pan_card_number,
				    passport_number,passport_expiry_date,"Studentlist");
			list=mo.populatelist();
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return SUCCESS;
	}
	
	public String getRoll_number() {
		return roll_number;
	}

	public void setRoll_number(String roll_number) {
		this.roll_number = roll_number;
	}

	public String getRegistration_number() {
		return registration_number;
	}

	public void setRegistration_number(String registration_number) {
		this.registration_number = registration_number;
	}

	public String getEmail_id() {
		return email_id;
	}

	public void setEmail_id(String email_id) {
		this.email_id = email_id;
	}
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getUpdate() {
		return update;
	}

	public void setUpdate(String update) {
		this.update = update;
	}

	public int getStudent_id() {
		return student_id;
	}
	public void setStudent_id(int student_id) {
		this.student_id = student_id;
	}

	public ArrayList<StudentDetailsVo> getList() {
		return list;
	}

	public void setList(ArrayList<StudentDetailsVo> list) {
		this.list = list;
	}
	public String getStudent_name() {
		return student_name;
	}
	public void setStudent_name(String student_name) {
		this.student_name = student_name;
	}
	public String getMobile_number() {
		return mobile_number;
	}
	public void setMobile_number(String mobile_number) {
		this.mobile_number = mobile_number;
	}
	public String getPhone_number() {
		return phone_number;
	}
	public void setPhone_number(String phone_number) {
		this.phone_number = phone_number;
	}
	public String getAddress_line_1() {
		return address_line_1;
	}
	public void setAddress_line_1(String address_line_1) {
		this.address_line_1 = address_line_1;
	}
	public String getAddress_line_2() {
		return address_line_2;
	}
	public void setAddress_line_2(String address_line_2) {
		this.address_line_2 = address_line_2;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getDate_of_birth() {
		return date_of_birth;
	}
	public void setDate_of_birth(String date_of_birth) {
		this.date_of_birth = date_of_birth;
	}
	public String getHighest_degree() {
		return highest_degree;
	}
	public void setHighest_degree(String highest_degree) {
		this.highest_degree = highest_degree;
	}
	public int getHighest_degree_marks() {
		return highest_degree_marks;
	}
	public void setHighest_degree_marks(int highest_degree_marks) {
		this.highest_degree_marks = highest_degree_marks;
	}
	public String getHighest_degree_college_name() {
		return highest_degree_college_name;
	}
	public void setHighest_degree_college_name(String highest_degree_college_name) {
		this.highest_degree_college_name = highest_degree_college_name;
	}
	public int getHighest_degree_passout_year() {
		return highest_degree_passout_year;
	}
	public void setHighest_degree_passout_year(int highest_degree_passout_year) {
		this.highest_degree_passout_year = highest_degree_passout_year;
	}
	public String getPrevious_degree_1() {
		return previous_degree_1;
	}
	public void setPrevious_degree_1(String previous_degree_1) {
		this.previous_degree_1 = previous_degree_1;
	}
	public int getPrevious_degree_1_marks() {
		return previous_degree_1_marks;
	}
	public void setPrevious_degree_1_marks(int previous_degree_1_marks) {
		this.previous_degree_1_marks = previous_degree_1_marks;
	}
	public String getPrevious_degree_1_college_name() {
		return previous_degree_1_college_name;
	}
	public void setPrevious_degree_1_college_name(
			String previous_degree_1_college_name) {
		this.previous_degree_1_college_name = previous_degree_1_college_name;
	}
	public int getPrevious_degree_1_passout_year() {
		return previous_degree_1_passout_year;
	}
	public void setPrevious_degree_1_passout_year(int previous_degree_1_passout_year) {
		this.previous_degree_1_passout_year = previous_degree_1_passout_year;
	}
	public String getPrevious_degree_2() {
		return previous_degree_2;
	}
	public void setPrevious_degree_2(String previous_degree_2) {
		this.previous_degree_2 = previous_degree_2;
	}
	public int getPrevious_degree_2_marks() {
		return previous_degree_2_marks;
	}
	public void setPrevious_degree_2_marks(int previous_degree_2_marks) {
		this.previous_degree_2_marks = previous_degree_2_marks;
	}
	public String getPrevious_degree_2_college_name() {
		return previous_degree_2_college_name;
	}
	public void setPrevious_degree_2_college_name(
			String previous_degree_2_college_name) {
		this.previous_degree_2_college_name = previous_degree_2_college_name;
	}
	public int getPrevious_degree_2_passout_year() {
		return previous_degree_2_passout_year;
	}
	public void setPrevious_degree_2_passout_year(int previous_degree_2_passout_year) {
		this.previous_degree_2_passout_year = previous_degree_2_passout_year;
	}
	public int getYears_of_experience() {
		return years_of_experience;
	}
	public void setYears_of_experience(int years_of_experience) {
		this.years_of_experience = years_of_experience;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getFather_name() {
		return father_name;
	}
	public void setFather_name(String father_name) {
		this.father_name = father_name;
	}
	public String getPan_card_number() {
		return pan_card_number;
	}
	public void setPan_card_number(String pan_card_number) {
		this.pan_card_number = pan_card_number;
	}
	public String getPassport_number() {
		return passport_number;
	}
	public void setPassport_number(String passport_number) {
		this.passport_number = passport_number;
	}
	public String getPassport_expiry_date() {
		return passport_expiry_date;
	}
	public void setPassport_expiry_date(String passport_expiry_date) {
		this.passport_expiry_date = passport_expiry_date;
	}
	
	
	
}


